# extends express
snippet /*
	/**
	 * $1
	 */

snippet u
	'use strict'
snippet v
	var $1 = $2
snippet l
	let $1 = $2
snippet c
	const $1 = $2
snippet =
	$1 = $2
snippet ==
	=== $0
snippet var
	var $1 = $0
snippet doc
	document.
snippet year
	var ${1:year} = new Date().getFullYear()
snippet al
	alert('${1:hi}')
snippet rt
	return $0
snippet rt
	return
snippet gd
	document.getElementById('$1')
snippet gc
	document.getElementsByClassName('$1')
snippet gt
	document.getElementsByTagName('$1')
snippet log
	console.log($0)
snippet lg
	console.log('\x1B[3${1:6}m%s\x1B[0m', $0)
snippet )
	($1) {
		$0
	}
snippet ),
	($1) {
		$0
	},
snippet lgp
	console.log(
		$0
	)
snippet fn
	function () {
		$0
	}
snippet fna
	function (${1:argument}) {
		$0
	}
snippet fun
	function $1() {
		$0
	}
snippet forlet
	for (let ${1:i} = 0; $1 < $2.length; $1++) {
		$0
	}
snippet forin
	for (let ${1:key} in ${2:objName}) {
		$0
	}
snippet ifel
	if (${1:true}) {
		${2:pass}
	} else {
		$0
	}
snippet sc
	<script type="text/javascript" charset="utf-8">
		$0
	</script>
snippet scs
	<script src="$0" charset="utf-8"></script>
snippet st
	<style type="text/css" media="screen">
		$0
	</style>
snippet }).
	}).then((${1:resp}) => {
		console.log($1)$0
	})
snippet },
	},
	${1:methods}: {
		$0
	}
snippet },,
	},
	${1:methods}: {
		$0
	},
snippet },f
	},
	${1:data} () {
		$0
	}
snippet },f,
	},
	${1:data} () {
		$0
	},
snippet dash
	replace(/([A-Z]{1})/g, \`-\$1\`).toLowerCase()
#########################################################################
#						mui js											#
#########################################################################

snippet m.pck.obj
	{value:'${1:val}',text:'${2:key}'}
snippet m.pck.obj+
	{value:'${1:val}',text:'${2:key}'},
	m.pck.obj+$0
snippet m.pck.0
	var picker = new mui.PopPicker()
	picker.setData([
		m.picker.obj+$0
	])
	picker.show(function (selectItems) {
		console.log(selectItems[0].text)
		console.log(selectItems[0].value)
	})
snippet m.pck.dat
	var dtpicker = new mui.DtPicker({
		type: "${7:datetime}",//设置日历初始视图模式
		beginDate: new Date(${1:2015}, ${2:04}, ${3:25}),//设置开始日期
		endDate: new Date(${4:2016}, ${5:04}, ${6:25}),//设置结束日期
		labels: ['Year', 'Mon', 'Day', 'Hour', 'min'],//设置默认标签区域提示语
		customData: {
		h: [
			{ value: 'AM', text: 'AM' },
			{ value: 'PM', text: 'PM' }
			]
		}//时间/日期别名
	})
	dtpicker.show(function(e) {
		console.log(e)
	})
snippet m.pck.scr
	<script type="text/javascript" charset="utf-8">
	(function($, doc) {
		$.ready(function() {

		$0

		})
	})(mui, document)
	</script>
snippet m.pck
	var ${1:city}Picker = new $.PopPicker(${2:{ layer: 2 }})
	$1Picker.setData($1Data)
	var $1PickerButton = doc.getElementById('${3:showMyPicker}')
	var $1Result = doc.getElementById('${4:myResult}')
	$1PickerButton.addEventListener('tap', function(event) {
		$1Picker.show(function(items) {
			$4.innerText = m.pck.2$0
			//返回 false 可以阻止选择框的关闭
			//return false
		})
	}, false)
snippet m.pck.1
	 JSON.stringify(items[0])
snippet m.pck.2
	 items[0].text + " " + items[1].text
snippet m.pck.3
	 (items[0] || {}).text + " " + (items[1] || {}).text + " " + (items[2] || {}).text
#==================================================
#联级表单json数据输入
snippet m.ob1
	var ${1:my}Data = [{
		m.dic+$0
	}]
#两联表单键值对
snippet m.ob2.ob
	}, {
		m.dic$1

		m.chd$2
		m.ob2.ob$0
snippet m.ob2.ob+
	}, {
		m.dic$1

		m.chd$2
		m.ob2.ob+$0
#两联表单
snippet m.ob2
	var ${1:price}Data = [{
		m.dic$2

		m.chd$3
		m.ob2.ob+$0
	}]
#两联子集
snippet m.chd
		children: [{
		m.dic+$0
		}] //==========
#键值对
snippet m.dic
		value: '${1:val}',
		text: '${2:$1}',
snippet m.dic+
		value: '${1:val}',
		text: '${2:$1}',
	},{
	m.dic+$0
#==================================================
snippet m.clk
	${1:element}.onclick = function(){
		$0
	}
snippet m.tap
	${1:element}.addEventListener('tap',function(){
		$0
	}
#######################################################################
#                                vuejs                                #
#######################################################################

snippet v.ico.mat
	import 'mdi/css/materialdesignicons.min.css'
snippet v.vue
	var vm = new Vue ({
		el: "${1:app}",
		data: {

		},
		filters: {

		},
		mounted: function() {

		},
		methods:  {

		},
	})
snippet v.store
	import Vue from 'vue'
	import Vuex from 'vuex'
	import * as actions from './actions'

	Vue.use(Vuex)

	const state = {
		$1
	}

	const mutations = {
	}

	const getters = {
	}

	export default new Vuex.Store({
		state,
		mutations,
		actions,
		getters
	})

snippet v.js
	exports.js = () => {
		return {
			name: '`expand("%:t:r")`$0',
			components: {
			},

			created () {
			},

			props: {
			},

			data () {
				return {
				}
			},

			computed: {
			},

			watch: {
			},

			methods: {
			},

			mounted () {
			}
		}
	}
#######################################################################
#                                 es6                                 #
#######################################################################

snippet mod.ex
	module.exports = $0
snippet klass
	export default class ${1:name} {
		constructor (${2}, ${3}, ${4}, ${5}, ${6}, ${7}, ${8}, ${9}) {
			this.$2 = $2
			this.$3 = $3
			this.$4 = $4
			this.$5 = $5
			this.$6 = $6
			this.$7 = $7
			this.$8 = $8
			this.$9 = $9
		}
	}

